{{ header }}
<div class="container">
  <h1>{{ heading_title }}<small>{{ text_step_3 }}</small></h1>
  {% if error_warning %}
  <div class="alert alert-danger alert-dismissible"><i class="icon-warning"></i> {{ error_warning }}
    <button type="button" class="close" data-dismiss="alert">&times;</button>
  </div>
  {% endif %}
  <form action="{{ action }}" method="post" enctype="multipart/form-data" class="form-horizontal">
    <h3>{{ text_db_connection }}</h3>
    <div class="form-group">
      <label class="col-sm-3 control-label" for="input-db-driver">{{ entry_db_driver }}</label>
      <div class="col-sm-6">
        <select name="db_driver" id="input-db-driver" class="form-control">
          {% if mysqli %}
          <option value="mysqli"{% if db_driver == 'mysqli' %} selected="selected"{% endif %}>{{ text_mysqli }}</option>
          {% endif %}
          {% if pdo %}
          <option value="mpdo"{% if db_driver == 'mpdo' %} selected="selected"{% endif %}>{{ text_mpdo }}</option>
          {% endif %}
          {% if pgsql %}
          <option value="pgsql"{% if db_driver == 'pgsql' %} selected="selected"{% endif %}>{{ text_pgsql }}</option>
          {% endif %}
        </select>
      </div>
    </div>
    <div class="form-group required{% if error_db_hostname %} has-error{% endif %}">
      <label class="col-sm-3 control-label" for="input-db-hostname">{{ entry_db_hostname }}</label>
      <div class="col-sm-6">
        <input type="text" name="db_hostname" value="{{ db_hostname }}" id="input-db-hostname" class="form-control" />
        {% if error_db_hostname %}
        <span class="help-block">{{ error_db_hostname }}</span>
        {% endif %}
      </div>
    </div>
    <div class="form-group required{% if error_db_port %} has-error{% endif %}">
      <label class="col-sm-3 control-label" for="input-db-port">{{ entry_db_port }}</label>
      <div class="col-sm-6">
        <input type="text" name="db_port" value="{{ db_port }}" id="input-db-port" class="form-control" />
        {% if error_db_port %}
        <span class="help-block">{{ error_db_port }}</span>
        {% endif %}
      </div>
    </div>
    <div class="form-group required{% if error_db_database %} has-error{% endif %}">
      <label class="col-sm-3 control-label" for="input-db-database">{{ entry_db_database }}</label>
      <div class="col-sm-6">
        <input type="text" name="db_database" value="{{ db_database }}" id="input-db-database" class="form-control" />
        {% if error_db_database %}
        <span class="help-block">{{ error_db_database }}</span>
        {% endif %}
      </div>
    </div>
    <div class="form-group required{% if error_db_username %} has-error{% endif %}">
      <label class="col-sm-3 control-label" for="input-db-username">{{ entry_db_username }}</label>
      <div class="col-sm-6">
        <input type="text" name="db_username" value="{{ db_username }}" id="input-db-username" class="form-control" />
        {% if error_db_username %}
        <span class="help-block">{{ error_db_username }}</span>
        {% endif %}
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label" for="input-db-password">{{ entry_db_password }}</label>
      <div class="col-sm-6">
        <input type="password" name="db_password" value="{{ db_password }}" id="input-db-password" class="form-control" />
      </div>
    </div>
    <div class="form-group{% if error_db_prefix %} has-error{% endif %}">
      <label class="col-sm-3 control-label" for="input-db-prefix">{{ entry_db_prefix }}</label>
      <div class="col-sm-6">
        <input type="text" name="db_prefix" value="{{ db_prefix }}" id="input-db-prefix" class="form-control" />
        {% if error_db_prefix %}
        <span class="help-block">{{ error_db_prefix }}</span>
        {% endif %}
      </div>
    </div>
    <h3>{{ text_db_administration }}</h3>
    <div class="form-group required{% if error_username %} has-error{% endif %}">
      <label class="col-sm-3 control-label" for="input-username">{{ entry_username }}</label>
      <div class="col-sm-6">
        <input type="text" name="username" value="{{ username }}" id="input-username" class="form-control" />
        {% if error_username %}
        <span class="help-block">{{ error_username }}</span>
        {% endif %}
      </div>
    </div>
    <div class="form-group required{% if error_email %} has-error{% endif %}">
      <label class="col-sm-3 control-label" for="input-email">{{ entry_email }}</label>
      <div class="col-sm-6">
        <input type="text" name="email" value="{{ email }}" id="input-email" class="form-control" />
        {% if error_email %}
        <span class="help-block">{{ error_email }}</span>
        {% endif %}
      </div>
    </div>
    <div class="form-group required{% if error_password %} has-error{% endif %}">
      <label class="col-sm-3 control-label" for="input-password">{{ entry_password }}</label>
      <div class="col-sm-6">
        <input type="text" name="password" value="{{ password }}" id="input-password" class="form-control" />
        {% if error_password %}
        <span class="help-block">{{ error_password }}</span>
        {% endif %}
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label" for="input-language">{{ entry_language }}</label>
      <div class="col-sm-6">
        <select name="language" id="input-language" class="form-control">
          {% for language in languages %}
          <option value="{{ language.code }}"{% if language.current %} selected="selected"{% endif %}>{{ language.name }}</a></li>
          {% endfor %}
        </select>
      </div>
    </div>
    {% if has_demo %}
    <div class="form-group">
      <div class="col-sm-offset-3 col-sm-6">
        <div class="checkbox">
          <label>
            <input type="checkbox" name="insert_demo"{% if insert_demo %} checked="checked"{% endif %} /> {{ text_insert_demo }}
          </label>
        </div>
      </div>
    </div>
    {% endif %}
    <div class="form-group">
      <div class="col-sm-offset-3 col-sm-6">
        <input type="submit" value="{{ button_continue }}" class="btn btn-success" />
        <a href="{{ back }}" class="btn btn-link">{{ button_back }}</a>
      </div>
    </div>
  </form>
</div>
{{ footer }}
